<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
</head>

<body>
  <div id="app"></div>

  <script>
    // TOKEN
    const matched = /TOKEN=([^&]+)/.exec(location.search)
    sessionStorage.TOKEN = matched ? matched[1] : ''

    // 目标
    const target = location.href.replace(/login\/jump\.html.*/, matched ? 'admin' : 'login')

    // 重定向
    const matchedRedirect = /redirect=([^&]+)/.exec(location.search)
    const redirect = matchedRedirect ? matchedRedirect[1] : target

    // 跳转
    location.replace(redirect)
  </script>
</body>

</html>
